<script type="text/javascript">

	Ext.onReady(function(){

	    // create the Data Store
	    var store = new Ext.data.Store({
	        // load using HTTP
	        url: '<?php echo WSB_ADMIN_URL ?>test/extjs/ajax-xml-list/',

	        // the return will be XML, so lets set up a reader
	        reader: new Ext.data.XmlReader({
	               // records will have an "Item" tag
	               record: 'row',
	               id: 'id',
	               totalRecords: 'total'
	           }, [
	               // set up the fields mapping into the xml doc
	               // The first needs mapping, the others are very basic
	              // {name: 'title', mapping: 'title'},
	               'id', 'name', 'class', 'cfg', 'stylesheet', 'javascript', 'hidden', 'deleted', 'modified', 'created'
	           ])
	    });

	    // example of custom renderer function
	    function pctChange(val){
	        if(val > 0){
	            return '<a href="javascript:messageBoxConfirm(' + val + ');">L&ouml;schen</a> | <a href="javascript:alert(\'Editieren\');">Editieren</a>';
	        }
	        return '';
	    }

	    // create the grid
	    var grid = new Ext.grid.GridPanel({
	        store: store,
	        columns: [
	            {header: "ID", width: 120, dataIndex: 'id', sortable: true},
	            {header: "Name", width: 180, dataIndex: 'name', sortable: true},
	            {header: "Class", width: 115, dataIndex: 'class', sortable: true},
	            {header: "", width: 100, dataIndex: 'id', renderer: pctChange, sortable: false}
	        ],
	        renderTo:'extjsgrid',
	        width:640,
	        height:400
	    });

	    store.load();

	});

</script>

<?php if($this->error) { echo $this->error; } ?>
<h2>Tabelle</h2>
<div id="extjsgrid"></div>